<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>座席登录--鑫优移动客户端</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width">
        <link rel="stylesheet" href="/Sites/AppRes/jquery.mobile-1.4.2/jquery.mobile.icons-1.4.2.min.css" />
        <link rel="stylesheet" href="/Sites/AppRes/jquery.mobile-1.4.2/jquery.mobile-1.4.2.min.css" />
        <script type="text/javascript" src="/Sites/AppRes/Jquery/jquery-1.10.0.min.js"></script>
        <script type="text/javascript" src="/Sites/AppRes/jquery.mobile-1.4.2/jquery.mobile-1.4.2.min.js"></script>
        <script type="text/javascript" src="/Sites/AppRes/Jquery.MD5.js"></script>
    </head>
    <body>
        <table>
            <tr><td>工号：</td><td><input type="text" id="tbAgentid" value="1800" /></td></tr>
            <tr><td>密码：</td><td><input type="password" id="tbPassword" value="789789" /></td></tr>
            <tr><td>&nbsp;</td><td><input type="button" id="btnSubmit" value="登录" /></td></tr>
        </table>
        <script type="text/javascript">
            var apiurl = 'http://www.ehaocha.com/ServicesAPI/CommonApi.aspx';
            $('#btnSubmit').click(function() {
                var uid = $('#tbAgentid').val();
                var pwd = $('#tbPassword').val();
                var msg = '';
                if (uid.length == 0)
                    msg += '用户名未填写!\n';
                if (pwd.length == 0)
                    msg += '密码未填写!\n';
                if (msg.length > 0) {
                    alert(msg);
                    return;
                }
                pwd=$.md5lite(pwd);
                //var teststr=apiurl+'?agentId='+uid+'&password='+pwd+'&action=login&rnd='+Math.random();
                //document.write(teststr);
                $.post(apiurl, {agentId: uid, password: pwd, action: 'login', rnd: Math.random()}, function(msg,b,c) {
                    alert(b);
                    alert(c);
                    alert(msg);
                });
            });
        </script>
    </body>
</html>
